package Demo429;

import java.util.Scanner;

public class Test01 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入你的汽车价值");
        int money = scanner.nextInt();

        System.out.println("请输入你的汽车的事故次数");
        int number = scanner.nextInt();
        if(number == 0){
            Car car0 = new baofei0();
            car0.car(money);
        }else if (number == 1){
            Car car1 = new baofei1();
            car1.car(money);
        }else if (number >1){
            Car car2 = new baofei2();
            car2.car(money);
        }


    }
}
